﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Menu.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" href="them/ext-theme-crisp/build/resources/ext-theme-crisp-all-debug.css" type="text/css" />
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    <script type="text/javascript" src="js/jquery-1.11.0.js"></script>
    <script type="text/javascript" src="js/ext-all-debug.js"></script>
    <script type="text/javascript" src="resources/javascript/TabCloseMenu.js"></script>
    <script type="text/javascript" src="resources/javascript/RowExpander.js"></script>
    <script type="text/javascript" src="menu.js"></script>

    <style type="text/css">
        p {
            margin: 5px;
        }

        .settings {
            background-image: url(shared/icons/fam/folder_wrench.png);
        }

        .nav {
            background-image: url(shared/icons/fam/folder_go.png);
        }

        .info {
            background-image: url(shared/icons/fam/information.png);
        }
    </style>
    <script type="text/javascript">
        Ext.require(['*']);

        Ext.onReady(function () {

            Ext.QuickTips.init();
            Ext.state.Manager.setProvider(Ext.create('Ext.state.CookieProvider'));

            var viewport = Ext.create('Ext.Viewport', {
                id: 'border-example',
                layout: 'border',
                items: [
                {
                    region: 'west',
                    stateId: 'navigation-panel',
                    id: 'west-panel', // see Ext.getCmp() below
                    title: 'Danh mục chính',
                    split: true,
                    width: 200,
                    minWidth: 175,
                    maxWidth: 400,
                    collapsible: true,
                    animCollapse: true,
                    margins: '0 0 0 5',
                    layout: 'accordion',
                    items: [
                        {
                            title: 'HỆ THỐNG',
                            html: '<p></p>',
                            id: 'nsd',
                            iconCls: 'nav'
                        },
                          {
                              title: 'QUẢN LÝ HỌC VIÊN',
                              id: 'hocvien', layout: 'fit', autoScroll: true,
                              //hidden: (b_modun.indexOf("HV") == -1 ? true : false),
                              iconCls: 'nav'
                          },
                           {
                               id: 'dao_tao',
                               title: 'QUẢN LÝ ĐÀO TẠO', layout: 'fit', autoScroll: true,
                               // hidden: (b_modun.indexOf("DT") == -1 ? true : false),
                               iconCls: 'nav'
                           }, {
                               title: 'QUẢN LÝ KÝ TÚC XÁ',
                               id: 'kytucxa', layout: 'fit', autoScroll: true,
                               //hidden: (b_modun.indexOf("KT") == -1 ? true : false),
                               iconCls: 'nav'
                           }, {
                               title: 'QUẢN LÝ HỌC PHÍ',
                               html: '<p></p>',
                               // hidden: (b_modun.indexOf("HP") == -1 ? true : false),
                               iconCls: 'nav'
                           }, {
                               title: 'QUẢN LÝ NHÂN SỰ',
                               id: 'ql_ns', layout: 'fit', autoScroll: true,
                               // hidden: (b_modun.indexOf("NS") == -1 ? true : false),
                               iconCls: 'nav'
                           }, {
                               title: 'QUẢN LÝ CÔNG VĂN',
                               html: '<p></p>',
                               id: 'ql_cv', layout: 'fit', autoScroll: true,
                               // hidden: (b_modun.indexOf("CV") == -1 ? true : false),
                               iconCls: 'nav'
                           }]
                },
                 Ext.create('Ext.tab.Panel', {
                     region: 'center',
                     deferredRender: false,
                     id: 'p',
                     activeTab: 0,
                     plugins: Ext.create('Ext.ux.TabCloseMenu', {
                         extraItemsTail: [
                             '-',
                             {
                                 text: 'Closable',
                                 id: 'tab1',
                                 checked: true,
                                 hideOnClick: true,
                                 handler: function (item) {
                                     currentItem.tab.setClosable(item.checked);
                                 }
                             }
                         ],
                         listeners: {
                             aftermenu: function () {
                                 currentItem = null;
                             },
                             beforemenu: function (menu, item) {
                                 var menuitem = menu.child('*[text="Closable"]');
                                 currentItem = item;
                                 menuitem.setChecked(item.closable);
                             }
                         }
                     })
                 })]
            });


            var qlcongvan = Ext.create('Ext.tree.Panel', {
                id: 'cv001',
                width: 250,
                autoScroll: true,
                height: 500,
                store: Ext.create('Ext.data.TreeStore', {
                    root: {
                        expanded: false,
                        children: [
                            {
                                text: "Mã",
                                expanded: false,
                                children: [
                                    {
                                        text: 'Loại công văn',
                                        leaf: true
                                    },
                                    {
                                        text: 'Chủ đề',
                                        leaf: true
                                    },
                                     {
                                         text: 'Tình trạng',
                                         leaf: true
                                     }
                                ]
                            },
                              {
                                  text: 'Nhập công văn',
                                  leaf: true
                              },
                              {
                                  text: 'Tìm kiếm',
                                  leaf: true
                              }
                        ]
                    }
                }),
                rootVisible: false,
                viewConfig: {
                    plugins: {
                        ptype: 'treeviewdragdrop',
                        appendOnly: true
                    }
                },
                renderTo: Ext.getCmp('cong_van'),
                listeners: {
                    itemclick: function (view, rec, item, index, eventObj) {
                        P_FREE_CHON(view, rec, item, index, eventObj);
                    }
                }
            });
            Ext.getCmp('dao_tao').add(qldaotao);
            Ext.getCmp('nsd').add(nsd);
            Ext.getCmp('hocvien').add(hv1);
            Ext.getCmp('kytucxa').add(ktuc);
            Ext.getCmp('ql_ns').add(nhan_su);
            Ext.getCmp('ql_cv').add(qlcongvan);
            
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <LIB:tieude runat="server" Text=""></LIB:tieude>
        <div id="container">
            <div id="toolbar"></div>
            <div id="west" class="x-hide-display">
            </div>
            <div id="hethong" class="x-hide-display">
            </div>
            <div id="ql_dt" class="x-hide-display">
            </div>
            <div id="qlhv" class="x-hide-display">
            </div>
            <div id="qlkt" class="x-hide-display">
            </div>
            <div id="nhan_su" class="x-hide-display">
            </div>
            <div id="cong_van" class="x-hide-display">
            </div>
            <div id="iframe" class="x-hide-display">
            </div>
            <div id="props-panel" class="x-hide-display" style="width: 200px; height: 200px; overflow: hidden;">
            </div>
        </div>
    </form>
</body>
</html>
